package com.bytedance.framwork.core.monitor;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;

import inline.NetworkDemo;

final class e extends BroadcastReceiver {
    private final c a;

    e(c arg1) {
        this.a = arg1;
    }

    public final void onReceive(Context arg9, Intent arg10) {
        long v2 = 0;
        if ((arg10.getAction().equals("android.net.conn.CONNECTIVITY_CHANGE")) && (c.b(this.a))) {
            String v0 = NetworkDemo.d(arg9);
            if (!TextUtils.isEmpty(((CharSequence) v0))) {
                if (TextUtils.isEmpty(c.c(this.a))) {
                    c.a(this.a, v0);
                    c.a(this.a, v2);
                    c.b(this.a, v2);
                    c.c(this.a, android.support.design.a.f(arg9));
                    c.a(arg9, c.c(this.a), c.d(this.a), c.e(this.a), c.f(this.a));
                } else if (!v0.equals(c.c(this.a))) {
                    if (c.c(this.a).equals("WIFI")) {
                        c.b(this.a, c.e(this.a) + (android.support.design.a.f(arg9) - c.f(this.a)));
                    } else {
                        c.a(this.a, c.d(this.a) + (android.support.design.a.f(arg9) - c.f(this.a)));
                    }

                    c.a(this.a, v0);
                    c.c(this.a, android.support.design.a.f(arg9));
                    c.a(arg9, c.c(this.a), c.d(this.a), c.e(this.a), c.f(this.a));
                }
            }
        }
    }
}

